package com.shiyi.design.strategy;

import java.util.Map;

/**
 * @Author qiu
 * @Date 2021/1/11 4:01
 */
public class Test {

    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            new Thread(() -> {
                Map<String, FireStrategy> map = FireRouter.getMap();
                map.forEach((k, v) -> {
                    System.out.println(Thread.currentThread().getName() + "---k= " + k + "---v= " + v.hashCode());
                });
            }).start();
        }

        FireStrategy fireStrategy = FireRouter.route("1");
        System.out.println(fireStrategy.fire());
    }

}
